using System;
using System.Collections;
using System.Collections.Generic;

using Ecreate.Popedom;

namespace Ecreate.Popedom
{
    public partial class tArea : BusinessBase<string>
    {
        #region Declarations

		private string _areaName = String.Empty;
		private int? _areaLevel = null;

        private  IList<tArea> _provinces = null;

        public virtual IList<tArea> Provinces
        {
            get { return _provinces; }
            set { _provinces = value; }
        }

        private IList<tArea> _citys = null;

        public virtual IList<tArea> Citys
        {
            get { return _citys; }
            set { _citys = value; }
        }

        private IList<tArea> _countrys = null;

        public virtual IList<tArea> Countrys
        {
            get { return _countrys; }
            set { _countrys = value; }
        }



		private string _parentAreacode = null;
		private string _standardAreaCode = String.Empty;
		private string _areaShortName = null;
		
        
        private int? _useFlag = null;
		private int? _lastFlag = null;
		
		
		
		#endregion

        #region Constructors

        public tArea() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            
            sb.Append(this.GetType().FullName);
			sb.Append(_areaName);
			sb.Append(_areaLevel);
			sb.Append(_parentAreacode);
			sb.Append(_standardAreaCode);
			sb.Append(_areaShortName);
			sb.Append(_useFlag);
			sb.Append(_lastFlag);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

		public virtual string AreaName
        {
            get { return _areaName; }
			set
			{
				OnAreaNameChanging();
				_areaName = value;
				OnAreaNameChanged();
			}
        }
		partial void OnAreaNameChanging();
		partial void OnAreaNameChanged();
		
		public virtual int? AreaLevel
        {
            get { return _areaLevel; }
			set
			{
				OnAreaLevelChanging();
				_areaLevel = value;
				OnAreaLevelChanged();
			}
        }
		partial void OnAreaLevelChanging();
		partial void OnAreaLevelChanged();
		
		public virtual string ParentAreacode
        {
            get { return _parentAreacode; }
			set
			{
				OnParentAreacodeChanging();
				_parentAreacode = value;
				OnParentAreacodeChanged();
			}
        }
		partial void OnParentAreacodeChanging();
		partial void OnParentAreacodeChanged();
		
		public virtual string StandardAreaCode
        {
            get { return _standardAreaCode; }
			set
			{
				OnStandardAreaCodeChanging();
				_standardAreaCode = value;
				OnStandardAreaCodeChanged();
			}
        }
		partial void OnStandardAreaCodeChanging();
		partial void OnStandardAreaCodeChanged();
		
		public virtual string AreaShortName
        {
            get { return _areaShortName; }
			set
			{
				OnAreaShortNameChanging();
				_areaShortName = value;
				OnAreaShortNameChanged();
			}
        }
		partial void OnAreaShortNameChanging();
		partial void OnAreaShortNameChanged();
		
		public virtual int? UseFlag
        {
            get { return _useFlag; }
			set
			{
				OnUseFlagChanging();
				_useFlag = value;
				OnUseFlagChanged();
			}
        }
		partial void OnUseFlagChanging();
		partial void OnUseFlagChanged();
		
		public virtual int? LastFlag
        {
            get { return _lastFlag; }
			set
			{
				OnLastFlagChanging();
				_lastFlag = value;
				OnLastFlagChanged();
			}
        }
		partial void OnLastFlagChanging();
		partial void OnLastFlagChanged();
		
        #endregion
    }
}
